package com.wmh.baseservice.user.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @author wmh generator
 * @since 2022-04-09
 */
@ApiModel(value = "UsActivityRegister对象", description = "")
public class UsActivityRegister implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态:	0已报名 1已签到 -1已取消")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "用户id")
    private Long usId;

    @ApiModelProperty(value = "活动id")
    private Long activityId;

    @ApiModelProperty(value = "商家id")
    private Long merchantId;

    @ApiModelProperty(value = "订单号")
    private String orderNum;

    @TableField(exist = false)
    private String nick;

    @TableField(exist = false)
    private String avatar;

    @TableField(exist = false)
    private String activityTitle;

    @TableField(exist = false)
    private String activityBanner;

    @TableField(exist = false)
    private String merchantName;

    @TableField(exist = false)
    private BigDecimal cost;

    @TableField(exist = false)
    private Date openTime;

    public Date getOpenTime() {
        return openTime;
    }

    public UsActivityRegister setOpenTime(Date openTime) {
        this.openTime = openTime;
        return this;
    }

    public String getActivityBanner() {
        return activityBanner;
    }

    public UsActivityRegister setActivityBanner(String activityBanner) {
        this.activityBanner = activityBanner;
        return this;
    }

    public BigDecimal getCost() {
        return cost;
    }

    public UsActivityRegister setCost(BigDecimal cost) {
        this.cost = cost;
        return this;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public UsActivityRegister setMerchantName(String merchantName) {
        this.merchantName = merchantName;
        return this;
    }

    public String getActivityTitle() {
        return activityTitle;
    }

    public UsActivityRegister setActivityTitle(String activityTitle) {
        this.activityTitle = activityTitle;
        return this;
    }

    public String getNick() {
        return nick;
    }

    public UsActivityRegister setNick(String nick) {
        this.nick = nick;
        return this;
    }

    public String getAvatar() {
        return avatar;
    }

    public UsActivityRegister setAvatar(String avatar) {
        this.avatar = avatar;
        return this;
    }

    public Long getId() {
        return id;
    }

    public UsActivityRegister setId(Long id) {
        this.id = id;
        return this;
    }

    public Integer getStatus() {
        return status;
    }

    public UsActivityRegister setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getRemark() {
        return remark;
    }

    public UsActivityRegister setRemark(String remark) {
        this.remark = remark;
        return this;
    }

    public Integer getVersion() {
        return version;
    }

    public UsActivityRegister setVersion(Integer version) {
        this.version = version;
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public UsActivityRegister setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public UsActivityRegister setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public Long getUsId() {
        return usId;
    }

    public UsActivityRegister setUsId(Long usId) {
        this.usId = usId;
        return this;
    }

    public Long getActivityId() {
        return activityId;
    }

    public UsActivityRegister setActivityId(Long activityId) {
        this.activityId = activityId;
        return this;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public UsActivityRegister setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
        return this;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public UsActivityRegister setOrderNum(String orderNum) {
        this.orderNum = orderNum;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String US_ID = "us_id";

    public static final String ACTIVITY_ID = "activity_id";

    public static final String MERCHANT_ID = "merchant_id";

    public static final String ORDER_NUM = "order_num";

    @Override
    public String toString() {
        return "UsActivityRegister{" +
                "id=" + id +
                ", status=" + status +
                ", remark='" + remark + '\'' +
                ", version=" + version +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", usId=" + usId +
                ", activityId=" + activityId +
                ", merchantId=" + merchantId +
                ", orderNum='" + orderNum + '\'' +
                ", nick='" + nick + '\'' +
                ", avatar='" + avatar + '\'' +
                ", activityTitle='" + activityTitle + '\'' +
                ", activityBanner='" + activityBanner + '\'' +
                ", merchantName='" + merchantName + '\'' +
                ", cost=" + cost +
                ", openTime=" + openTime +
                '}';
    }

    public final static String[] getFields(String... noField) {
        List<String> list = new ArrayList<>(Arrays.asList(
                UsActivityRegister.ID
                , UsActivityRegister.STATUS
                , UsActivityRegister.REMARK
                , UsActivityRegister.VERSION
                , UsActivityRegister.CREATE_TIME
                , UsActivityRegister.UPDATE_TIME
                , UsActivityRegister.US_ID
                , UsActivityRegister.ACTIVITY_ID
                , UsActivityRegister.MERCHANT_ID
                , UsActivityRegister.ORDER_NUM
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}